#!/usr/bin/python3

line = input('Please enter a line, # to end:\n')

def print_top(line):
    words = line.split()
    scores = list(map(int, words))
    scores.sort()
    print(scores[-1], scores[-2], scores[-3])

while line != '#' :
    print_top(line)
    line = input('Please enter a line, # to end:\n')